<?php

/*
Add Update (admin_add_update.php)
*/

$page_title = "Add Update";
$rank_check = 7;
include "../header.inc.php";

print "$openHTML";


$act=$_GET['act'];
$game=$_GET['game'];


if ($act == "limit")
{

$findLimit = fetch("SELECT entry_limit FROM page_limits WHERE page = 'updates' AND game = '$game'");

if (!$findLimit[entry_limit]) { $findLimit[entry_limit] = "10"; }

ECHO <<<LIMIT

<p>Enter a number of updates that the <a href=../updates.php?game=$game>updates page</a> will show per page. Depending on the size of your average updates you may want to make it more or less. Now it's upto you :)</p>

<p>
<FORM ACTION="admin_add_update.pro.php?game=$game&act=limit" METHOD=POST>
Show <input type=text name=per_page value=$findLimit[entry_limit] size=5> updates per page.<br>
<input type=submit value="Edit">
</form>
</p>

LIMIT;

}

if (!$act)
{

ECHO <<<END
<p>This is the perfect place to let all your users know about new features on your site! Updating often is a key to a successful game. So even if it's just letting everyone know of the new items or the winners of the lottery, you should let everyone know by using this form. Simply type in the update and click the "Add Update" button, it will then add the update and redirect you to the <a href=../updates.php?game=$game>updates page</a>.</p>

<P>
<FORM ACTION="admin_add_update.pro.php?game=$game" METHOD=POST>
   <CENTER><TABLE BGCOLOR="$tableOutline" CELLSPACING=1 CELLPADDING=0 WIDTH=450>
      <TR BGCOLOR="$topAndBottomBG">
         <TD COLSPAN=2>
            <FONT SIZE="-1" COLOR="$topAndBottomText"><b>Add Update:</b></FONT>
         </TD>
      </TR>
      <TR BGCOLOR="$maincellColor">
         <TD HEIGHT=20>
            <p>Subject:</p>
         </TD>
         <TD HEIGHT=20>
            <P>&nbsp;<input type=text name=subject></P>
		</TD>
      </TR>
      <TR BGCOLOR="$reallyLight">
         <TD WIDTH=80>
            <P>Update:</P>
         </TD>
         <TD>
            <P>&nbsp;<TEXTAREA NAME="add_update" ROWS=10 COLS=50 WRAP=virtual></TEXTAREA></P>
         </TD>
      </TR>
      <TR>
         <TD COLSPAN=2 HEIGHT=30 BGCOLOR="$topAndBottomBG">
            <CENTER><INPUT TYPE=submit NAME=Submit VALUE="Add Update!!"></CENTER>
         </TD>
      </TR>
   </TABLE>
   </CENTER>
</FORM></P>
END;
}

print "$closeHTML";
?>
